package com.example.shaoying.yuejian.model;


import com.example.shaoying.yuejian.common.Constants;
import com.example.shaoying.yuejian.service.activityService;
import com.example.shaoying.yuejian.service.photoService;

import java.io.File;

import okhttp3.MultipartBody;
import retrofit2.Call;
import retrofit2.Retrofit;
import retrofit2.converter.gson.GsonConverterFactory;

/**
 * Created by Administrator on 2017/4/19.
 */

public class PhotoModel {
    private Retrofit retrofit;
    public PhotoModel(){
                retrofit = new Retrofit.Builder()
                .baseUrl(Constants.SERVERADDRESS)
                .addConverterFactory(GsonConverterFactory.create())
                .build();
    }
    public Call getshaituList(){
        photoService  service=retrofit.create(photoService.class);
        return service.getShaiTuList();
    }
    public Call addpost(String uid, String title, MultipartBody.Part file ){
        photoService  service=retrofit.create(photoService.class);
        return service.addpost(uid,title, file);
    }


}
